﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index1.aspx.cs" Inherits="AnyOffice.general.report.manage.index1" %>

<%@Register TagPrefix="Webdiver" Namespace="Webdiver" Assembly="AspnetPager" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title></title>
		
		<script language="javascript" type="text/javascript">
function open_week(report_id)
{ 
 var mwidth = "600";
 var mheight = "450";
 var loc_x = parseInt((window.screen.width - mwidth) / 2);
 var loc_y = parseInt((window.screen.height - mwidth) / 2);

 var _oParameter = new Object();
 _oParameter.dialogTitle = "季汇报";
 _oParameter.openFile = "read_week.aspx?report_id=" + report_id + "&num=" + Math.random();

 window.showModalDialog('shDialog.htm', _oParameter, 'dialogHeight:' + mheight + 'px;dialogWidth:' + mwidth + 'px;dialogLeft:' + loc_x + ';dialogTop:' + loc_y + ';help:no;status:no;scroll:yes;titlebar:no;toolbar:no');
   

}

function open_month(report_id)
{
 
 var mwidth = "600";
 var mheight = "450";
 var loc_x = parseInt((window.screen.width - mwidth) / 2);
 var loc_y = parseInt((window.screen.height - mwidth) / 2);

 var _oParameter = new Object();
 _oParameter.dialogTitle = "工作汇报";
 _oParameter.openFile = "read_month.aspx?report_id=" + report_id + "&num=" + Math.random();

 window.showModalDialog('shDialog.htm', _oParameter, 'dialogHeight:' + mheight + 'px;dialogWidth:' + mwidth + 'px;dialogLeft:' + loc_x + ';dialogTop:' + loc_y + ';help:no;status:no;scroll:yes;titlebar:no;toolbar:no');
   

}

function open_year(report_id) { 
    var mwidth = "600";
    var mheight = "450";
    var loc_x = parseInt((window.screen.width - mwidth) / 2);
    var loc_y = parseInt((window.screen.height - mwidth) / 2);

    var _oParameter = new Object();
    _oParameter.dialogTitle = "年汇报";
    _oParameter.openFile = "read_year.aspx?report_id=" + report_id + "&num=" + Math.random();

    window.showModalDialog('shDialog.htm', _oParameter, 'dialogHeight:' + mheight + 'px;dialogWidth:' + mwidth + 'px;dialogLeft:' + loc_x + ';dialogTop:' + loc_y + ';help:no;status:no;scroll:yes;titlebar:no;toolbar:no');
  
     

}


function delete_week(report_id,page)
{
 msg='确认要删除该季报么？';
 if(window.confirm(msg))
 {
  URL="delete.aspx?report_id=" + report_id + "&page=" + page;
  window.location=URL;
 }
}


function delete_month(report_id,page)
{
    msg = '确认要删除该项工作么？';
 if(window.confirm(msg))
 {
  URL="delete.aspx?report_id=" + report_id + "&page=" + page;
  window.location=URL;
 }
}

</script>
	</HEAD>
	<body class="bodycolor" style="padding-top:0;" topmargin="5">
		<form id="Form1" method="post" runat="server">
          <div class="main_div">
			<table class="small" cellSpacing="0" cellPadding="3" width="100%" border="0">
				<tr>
					<td class="tab_ti" width="40%"><span class="big3">
							工作汇报管理</span></td>
					<td width="20%">
						<asp:Literal id="litNavCount" runat="server"></asp:Literal>
					</td>
					<td width="40%">
						<asp:Literal id="litNavPager" runat="server"></asp:Literal>
					</td>
				</tr>
			</table>
			<asp:panel id="pnlMain" runat="server">
				<asp:Repeater id="rptReport" runat="server">
					<HeaderTemplate>
						<table width="100%" cellSpacing="0" cellPadding="0" border="0" class="tab_pub" align="center">
							<tr>
								<th nowrap align="center" width="30%">标题</th>
								<th nowrap align="center">类型</th>
								<th nowrap align="center">管理人员</th>
								<th nowrap align="center">填写时间</th>
								<th nowrap align="center">领导点评</th>
								<th nowrap align="center">操作</th>
							</tr>
					</HeaderTemplate>
					<ItemTemplate>
						<tr class="TableLine1">
							<td>
								<a href="javascript:<%#getJsNameByTypeID(Eval("Type").ToString())%>('<%#Eval("ReportId")%>');"><%#Eval("Title")%></a>
							</td>
							<td nowrap align="center"><%#getTypeNameByTypeID(Eval("Type").ToString())%></td>
							<td><%# Eval( "Managers").ToString() != string.Empty ? GetUserNames(Eval( "Managers").ToString()) : ""%></td>
							<td nowrap align="center"><%#Convert.ToDateTime(Eval("ReportTime").ToString()).ToString("yyyy-MM-dd")%></td>
							<td nowrap align="center">
								<%#IsExists(Convert.ToInt32(Eval("ReportId").ToString())) == true ? "<a href=\"javascript:" + "open_month('" + Eval("ReportId").ToString() + "');\">查看</a>" : ""%>
							</td>
							<td nowrap align="center">
								<a href="month_edit.aspx?report_id=<%#Eval("ReportId")%>&page=<%=ViewState["CurrentPage"]%>">修改</a> 
								<a href="javascript:delete_month('<%#Eval("ReportId")%>','<%=ViewState["CurrentPage"]%>');">删除</a>
							</td>						
						</tr>
					</ItemTemplate>	
					<AlternatingItemTemplate>
					<tr class="TableLine2">
							<td>
								<a href="javascript:<%#getJsNameByTypeID(Eval("Type").ToString())%>('<%#Eval("ReportId")%>');"><%#Eval("Title")%></a>
							</td>
							<td nowrap align="center"><%#getTypeNameByTypeID(Eval("Type").ToString())%></td>
							<td><%#Eval( "Managers").ToString() != string.Empty ? GetUserNames(Eval( "Managers").ToString()) : ""%></td>
							<td nowrap align="center"><%#Convert.ToDateTime(Eval("ReportTime").ToString()).ToString("yyyy-MM-dd")%></td>
							<td nowrap align="center">
								<%#IsExists(Convert.ToInt32(Eval("ReportId").ToString())) == true ? "<a href=\"javascript:"+"open_month('" + Eval("ReportId").ToString() + "');\">查看</a>" : ""%>
							</td>
							<td nowrap align="center">
								<a href="month_edit.aspx?report_id=<%#Eval("ReportId")%>&page=<%=ViewState["CurrentPage"]%>">修改</a> 
								<a href="javascript:delete_month('<%#Eval("ReportId")%>','<%=ViewState["CurrentPage"]%>');">删除</a>
							</td>						
						</tr>
					</AlternatingItemTemplate>				
					<FooterTemplate>
						</table>
					</FooterTemplate>
				</asp:Repeater>
				<div class="div_cotr">
							<WEBDIVER:ASPNETPAGER id="AspNetPager1" runat="server" CssClass="small1" InputBoxClass="SmallInput" SubmitButtonClass="bnt05"
								Font-Size="10pt" OnPageChanged="ChangePage" HorizontalAlign="Right" ShowCustomInfoSection="left" ShowInputBox="Always"
								SubmitButtonText="转 到" NumericButtonTextFormatString="[{0}]" UrlPaging="True" CustomInfoSectionWidth="35%"
								PagingButtonSpacing="0" ImagePath="../images" ButtonImageNameExtension="n" CpiButtonImageNameExtension="r"
								DisabledButtonImageNameExtension="g" PageSize="10" AlwaysShow="True"></WEBDIVER:ASPNETPAGER></WEBDIVER:ASPNETPAGER>
					<div style="clear:both;"></div>
				</div>
			</asp:panel>
			<asp:literal id="litMessage" runat="server"></asp:literal>
            </div>
		</form>
	</body>
</HTML>
